import 'package:flutter/material.dart';

class PutStoreProv extends ChangeNotifier {
  bool _isLoading = false;
  String? _error;
  String? _uploadStoreFrontUrl;

  String? get uploadStoreFrontUrl => _uploadStoreFrontUrl;
  bool get isLoading => _isLoading;
  String? get error => _error;

  Future<void> updateStoreFrontImage(String? imgUrl) async {
    _isLoading = true;
    _error = null;
    notifyListeners();

    try {
      // Here you would typically make an API call to update the backend
      // For now, we'll just update the local state
      _uploadStoreFrontUrl = imgUrl;
    } catch (e) {
      _error = e.toString();
      debugPrint('Failed to update store front image: $e');
    } finally {
      _isLoading = false;
      notifyListeners();
    }
  }
}
